package com.xiaoxie;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.awt.*;
import java.net.URI;

@SpringBootApplication
@Transactional

public class MemoryWordsApplication {

    public static void main(String[] args) {
        SpringApplication.run(MemoryWordsApplication.class, args);
        System.out.println("MemoryWordsApplication is running...");
    }


}
@Component
class StartupRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        String url = "http://localhost:8080/static/login.html" ;
        System.setProperty("java.awt.headless", "false");
        Desktop.getDesktop().browse( new URI(url));
    }
}
